#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>
#include <stdint.h>

#include "oled.h"
#include "font.h"
#include "myoled.h"

#define FILENAME "/dev/i2c-3"
static struct display_info disp;

int oled_show(void *arg)
{
    unsigned char *buffer = (unsigned char *)arg;
    if(NULL != buffer)
    {
        oled_putstrto(&disp, 0, 9+1, buffer);
    }

    disp.font = font2;
    oled_send_buffer(&disp);
}   
int myoled_init(void) 
{
    int e;

    disp.address = OLED_I2C_ADDR;
    disp.font = font2;

    e = oled_open(&disp, FILENAME);
    e = oled_init(&disp);
    oled_clear(&disp);

    return e;
}